home *** CD-ROM | disk | FTP | other *** search
- /*
- MaximizeConsoleHeight.c
- THINK C provides a built-in console. That console is less useful than it might be
- because it opens to only a small size, presumably designed to fit on the smallest
- Mac screen. This routine opens the console to the full height of your main screen.
- Call MaximizeConsoleHeight BEFORE opening the console in THINK C.
-
- To change the WIDTH of your THINK C console do this:
- #include <console.h>
- ...
- console_options.ncols=100;
-
- HISTORY:
- 1/92 dgp wrote it.
- 8/27/92 dgp check for 8-bit quickdraw before using GDevices.
- 10/10/92 dgp Reduced maximum console height by one pixel, so as not to clip
- displayed text.
- 2/22/93 dgp replaced GetMBarHeight() by MBarHeight.
- */
-
- #include "VideoToolbox.h"
- #if THINK_C
- #include <LoMem.h> // MBarHeight
- #include <console.h>
- #endif
-
- void MaximizeConsoleHeight(void)
- {
- #if THINK_C
- int error;
- long v;
-
- error=Gestalt(gestaltQuickdrawVersion,&v);
- if(!error && v>=gestalt8BitQD){
- console_options.top=MBarHeight+19;
- console_options.left=1;
- console_options.nrows=
- (**(**MainDevice).gdPMap).bounds.bottom-4-console_options.top;
- console_options.nrows/=console_options.txSize*4/3-1; /* estimate line spacing */
- }
- #endif
- }